package com.ocom.payhandle.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ocom.common.entity.card.EntityCardInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface IDaoCardInfo extends BaseMapper<EntityCardInfo> {

	@Select({"<script>",
			"select  id,account_no,end_date,card_state,use_ls_now,p_id,card_no  " +
					"FROM card_info  \n" +
					"where com_id=#{comId}  and  lower(card_no)=#{cardNo} order by update_time desc limit 1" +
					"</script>"})
	EntityCardInfo getCardInfo(@Param("comId")Long comId,@Param("cardNo")String cardNo);
}
